﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ForgetCodeStep2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
		if (SessionMan.GetResetPasswordUser()==null)
		{
			Response.Redirect("ForgetCode.aspx");
		}
		else
		{
			if (IsPostBack)
			{
				if (SE6.UserMan.ResetPasswordStep2(Request,Session))
				{
					SessionMan.SaveResult(
						"重置密码成功，可以用新密码<a href='login.aspx'>登陆</a>啦，请不要再忘记了哦！");
					Response.Redirect("result.aspx");
				}
				else
				{
					feedBack.CssClass = "red";
					feedBack.Text = "回答错误！你不会连这都忘了吧，哦滴神啦！";
				}
			}
			else
			{
				question.Text = SessionMan.GetResult();
				feedBack.Text = "好好回忆下，在一个阳光明媚的夏天，你在本系统注册了...";
			}
		}
		navMenu.InnerHtml = GUI.NavMenu(PageClass.ResetPassword2);
    }
}
